$(document).ready(function() {
	set_footer_position();
	header_button_action_bind();
	img_button_bind("#save_button", "imgs/common/save_button_normal.png", "imgs/common/save_button_hover.png", "imgs/common/save_button_active.png");
	$("#set_account_button").unbind("click");
	$("#set_account_button").unbind("hover");
	$("#set_account_button").attr("src", "imgs/personal_home/set_account_button_hover.png");
	save_button_bind();
});


function save_button_bind() {
	$("#save_button").click(function() {
		var password = $("#set_password_text").val();
		if(password == "") {
			$("#set_password_info").text("请输入密码");
			return;
		} else {
			$("#set_password_info").text("");
		}

		var confirm_password = $("#confirm_password_text").val();
		if(confirm_password != password) {
			$("#confirm_password_info").text("两次输入的密码不一致");
			return;
		} else {
			$("#confirm_password_info").text("");
		}

		var question = $("#set_question_text").val();
		if(question == "") {
			$("#set_question_info").text("请输入密码提示问题");
			return;
		} else {
			$("#set_question_info").text("");
		}

		var answer = $("#set_answer_text").val();
		if(answer == "") {
			$("#set_answer_info").text("请输入问题答案");
			return;
		} else {
			$("#set_answer_info").text("");
		}
	});
}